LIBS = -ltcp
CC = gcc
FLAGES= -Wall -g -o2 

EXECUTABLES =hello_server hello_client variable_recv_client variable_recv_server
.c.o:
	$(CC) ${FLAGES} -c $< -o $@
	
all: ${EXECUTABLES} 

hello_server: hello_server.o 
	$(CC) -o hello_server -L ../lib hello_server.o $(LIBS)
	
hello_client: hello_client.o 
	$(CC) -o hello_client -L ../lib hello_client.o $(LIBS)
	
variable_revc_client.o: variable_revc_client.c ../include/base.h
	${CC} ${FLAGES} -c $< -o  variable_revc_client.o
	
variable_recv_client: variable_recv_client.o
	$(CC) -o variable_recv_client -L ../lib variable_recv_client.o $(LIBS)
	
variable_recv_server: variable_recv_server.o
	$(CC) -o variable_recv_server -L ../lib variable_recv_server.o $(LIBS)	
	
clean :
	-rm *.o
	-rm $(EXECUTABLES)